<?php

    /**
     * Synergy.php
     * 
     * This class orchestrates the framework tasks and moves the request
	 * through the proper steps all the way to display.
     **/

	class Synergy {

		/**
		 * Dispatches the actions controller method, interceptors,
		 * views, and decorators.
		 **/
		public function output($request) {

			$this->_getActionDefinition($request);

			$this->_initializeAOP();

			// EXECUTE CONTROLLER METHOD

			// EXECUTE INTERCEPTORS

			// LAUNCH VIEW SYSTEM

		}

		/**
		 * Gets the ActionMap object and requests the Action
		 * matching this particular request.
		 **/
		private function _getActionDefinition($request) {
			
			$actionMap = SynergyActionMap::getInstance();
			
			// $stack = SynergyStack::getInstance();

			// $config = SynergyConfig::getInstance();

			// $action = $actionMap->getAction($request); 

			// $stack->put($config->get('stack.actionMap'), $action);

		}

		/**
		 * Initializes the AOP Daemon.
		 **/
		private function _initializeAOP() {

			// $stack = SynergyStack::getInstance();

			// $action = $stack->get('s_action');


		}

	}

?>
